package structure_pattern.adapter_pattern;

/**
 * @author fly
 * @data 2022-04-12
 * 适配器模式：适配器类，来适配 Encrypting 类给 DatabaseOperation 接口使用
 */
public class EncryptingOneAdapter implements DatabaseOperation{

    /**
     * 组合 适配着类型
     */
    private EncryptingOne encryptingOne;

    /**
     * 适配器类构造方法，初始化适配者类
     */
    public EncryptingOneAdapter() {
        encryptingOne = new EncryptingOne();
    }

    @Override
    public void encrypting() {
        encryptingOne.encrypting();
    }
}